<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/taglibs.jsp" %>
<html>
<head> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form1" action="update">
<div class="dialogPage">
	<div class="om-panel-header">编辑</div>
	<div class="editDiv">
		<input type="hidden" id="id" name="id" value="${type.id}" >
		<table class="editTable">
		<tr>
			<td>父类型：</td> <td>${parent.name}</td>
		</tr>
		<tr>
			<td><span class="required">*</span>类型名字：</td><td><input type="text" id="name" name="name"  value="${type.name}" > </td>
		</tr>
		<tr>
			<td><span class="required">*</span>英文名字：</td><td><input type="text" id="englishName" name="englishName"  value="${type.englishName}" > </td>
		</tr>
		<tr>
			<td>类型描述：</td><td><input type="text" id="typeDesc" name="typeDesc" value="${type.typeDesc}"></td>
		</tr>
		<tr>
			<td>类型状态：</td><td><input id="status" name="status" type="combo"></td>
		</tr>
	   </table>
	   <div class="editBtn">
			<button id ="btnSubmit" type="button" class="button">&nbsp;保存&nbsp;</button>
			<button type="button" class="button" onclick="javascript:art.dialog.close();">&nbsp;关闭&nbsp;</button>
		</div>
	</div>
</div>
</form>
</body>
<script type="text/javascript">
$(function(){
	$('#name').validatebox({
		required:true
	}); 
	$('#typeDesc').validatebox({
		validType:['maxLength[200]']
	});
    $('#status').combobox({  
    	data:JSON.parse('${statusCombo}'),
    	panelHeight:'auto',
    	editable:false,
    	value:'${type.status}'
    }); 
	$('#btnSubmit').click(function(){
		if($('#form1').form('validate')){
			$('#form1').submit();
		}
	})
});
</script>
</html>